home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 4: GNU Archives / Linux Cubed Series 4 - GNU Archives.iso / gnu / gawk-3.000 / gawk-3 / gawk-3.0.0 / atari / Makefile.awklib < prev    next >
Encoding:
Makefile  |  1995-12-29  |  2.9 KB  |  105 lines

  1. # Makefile for GNU Awk support library
  2. # Copy this file to 'awklib' subdirectory of main directory
  3. # and execute via relevant targets in your top Makefile
  4. #
  5. # This Makefile actually will work for awklib even when NOT
  6. # compiling with Atari Makefile!!!
  7. #
  8. # Copyright (C) 1995 the Free Software Foundation, Inc.
  9. # This file is part of GAWK, the GNU implementation of the
  10. # AWK Programming Language.
  11. # GAWK is free software; you can redistribute it and/or modify
  12. # it under the terms of the GNU General Public License as published by
  13. # the Free Software Foundation; either version 2 of the License, or
  14. # (at your option) any later version.
  15. # GAWK is distributed in the hope that it will be useful,
  16. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  18. # GNU General Public License for more details.
  19. # You should have received a copy of the GNU General Public License
  20. # along with this program; if not, write to the Free Software
  21. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA
  22.  
  23. SHELL = /bin/sh
  24.  
  25. srcdir = .
  26.  
  27. INSTALL = /usr/bin/install -c
  28. INSTALL_PROGRAM = ${INSTALL}
  29. INSTALL_DATA = ${INSTALL} -m 644
  30.  
  31. CC = gcc
  32. CFLAGS = -g -O
  33.  
  34. prefix = /usr/local
  35. exec_prefix = ${prefix}
  36. binprefix =
  37. manprefix =
  38.  
  39. bindir = ${exec_prefix}/bin
  40. libdir = ${exec_prefix}/lib
  41. mandir = ${prefix}/man/man1
  42. manext = .1
  43. infodir = ${prefix}/info
  44. datadir = ${prefix}/share/awk
  45. libexecdir = ${exec_prefix}/libexec/awk
  46.  
  47. PWCAT = pwcat
  48. GRCAT = grcat
  49. AUXPROGS = $(PWCAT) $(GRCAT)
  50. GCOM = '{print}'
  51. GAWK = ../gawk
  52. AUXAWK = passwd.awk group.awk
  53.  
  54. all: stamp-eg $(AUXPROGS) igawk $(AUXAWK)
  55.  
  56. stamp-eg: $(srcdir)/../doc/gawk.texi
  57.     rm -fr eg stamp-eg
  58.     $(GAWK) -f $(srcdir)/extract.awk $(srcdir)/../doc/gawk.texi
  59.     @echo 'some makes are stupid and will not check a directory' > stamp-eg
  60.     @echo 'against a file, so this file is a place holder. gack.' >> stamp-eg
  61.  
  62. $(PWCAT): $(srcdir)/eg/lib/pwcat.c
  63.     $(CC) $(CFLAGS) $(srcdir)/eg/lib/pwcat.c -o $@
  64.  
  65. $(GRCAT): $(srcdir)/eg/lib/grcat.c
  66.     $(CC) $(CFLAGS) $(srcdir)/eg/lib/grcat.c -o $@
  67.  
  68. igawk: $(srcdir)/eg/prog/igawk.sh
  69.     $(GAWK) $(GCOM) $(srcdir)/eg/prog/igawk.sh > $@ ; chmod 755 $@
  70.  
  71. passwd.awk: $(srcdir)/eg/lib/passwdawk.in
  72.     (cd $(srcdir)/eg/lib ; \
  73.     sed 's;/usr/local/libexec/awk;$(libexecdir);' < passwdawk.in) > passwd.awk
  74.  
  75. group.awk: $(srcdir)/eg/lib/groupawk.in
  76.     (cd $(srcdir)/eg/lib ; \
  77.     sed 's;/usr/local/libexec/awk;$(libexecdir);' < groupawk.in) > group.awk
  78.  
  79. install: igawk $(AUXPROGS) $(AUXAWK)
  80.     $(INSTALL_PROGRAM) igawk $(bindir)
  81.     for i in $(AUXPROGS) ; do \
  82.         $(INSTALL_PROGRAM) $$i $(libexecdir) ; \
  83.     done
  84.     for i in $(AUXAWK) $(srcdir)/eg/lib/*.awk ; do \
  85.         $(INSTALL_DATA) $$i $(datadir) ; \
  86.     done
  87.  
  88. # libexecdir and bindir are removed in the top level Makefile's uninstall
  89. uninstall:
  90.     rm -fr $(libexecdir)/* $(datadir)/*
  91.     rm -f $(bindir)/igawk
  92.  
  93. clean:
  94.     rm -f $(AUXPROGS) igawk
  95.  
  96. maintainer-clean: clean
  97.     rm -fr eg stamp-eg
  98.  
  99. distclean: clean
  100.     rm -f Makefile
  101.